package org.ch03.test03;

/**
 * @author ZQX
 * @date 2025-03-26
 */
public class MainTest02 {
    public static void main(String[] args) {
        GenericTest<String> gt =
                new GenericTestImpl03<Double>();

        System.out.println(gt.sayHello("李四"));

        // 错误：接口对象只能访问接口的成员或访问实现类重写接口的方法
        // gt.setData(3.14) ;

        GenericTestImpl03<Double> gti = new GenericTestImpl03<>();
        gti.setData(3.14);
        System.out.println(gti.sayHello("张三"));
        System.out.println(gti.getData());

    }
}
